<%--
  Created by IntelliJ IDEA.
  User: luo
  Date: 2025/5/26
  Time: 22:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:include page="common/header.jsp">
    <jsp:param name="title" value="所有公告"/>
</jsp:include>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:choose>
    <c:when test="${user.isAdmin}">
        <%@ include file="common/adminMenu.jsp" %>
    </c:when>
    <c:otherwise>
        <%@ include file="common/userMenu.jsp" %>
    </c:otherwise>
</c:choose>

<div class="container">
    <div class="message">
        ${message}
    </div>
    <table border="1">
        <tr>
            <th>公告id:</th>
            <th>标题:</th>
            <th>内容详情:</th>
        </tr>
        <c:forEach items="${announcementList}" var="announcement">
            <tr>
                <td>${announcement.announcementId}</td>
                <td>${announcement.title}</td>
                <td><a href="find-announcement?announcementId=${announcement.announcementId}">查看内容详情</a></td>
            </tr>
        </c:forEach>
    </table>
</div>

<%@ include file="common/footer.jsp" %>


